package cc.fine.svc.main.bean;

import cc.fine.svc.main.bean.po.RelUserFan;
import cc.fine.svc.main.bean.po.RelUserVideoFavor;
import cc.fine.svc.main.bean.po.RelUserVideoHistory;
import cc.fine.svc.main.bean.po.RelUserVideoShare;
import cc.fine.svc.main.bean.vo.CommonPublishVo;
import lombok.Data;

import java.awt.*;
import java.io.Serializable;

/**
 * @AUTHOR: wyihe
 * @DATE: 2023/10/28
 *
 * MQ 的信息交换
 */
@Data
public class FineMessage implements Serializable{

    /**
     * 给视频点赞
     */
    public static final String FAVOR = "favor";

    /**
     * 取消视频的点赞
     */
    public static final String DIS_FAVOR = "dis_favor";

    /**
     * 发评论
     */
    public static final String PUBLISH_COMMON = "publish_common";

    /**
     * 分享视频
     */
    public static final String VIDEO_SHARE = "video_share";

    /**
     * 视频播放量+1，添加用户的观看历史记录
     */
    public static final String VIDEO_VIEW_HISTORY = "video_view_history";

    /**
     * 关注用户
     */
    public static final String USER_FANS_OP = "user_fans_op";

    /**
     * 取消关注用户
     */
    public static final String Dis_User_Fans_Op = "dis_user_fans_op";

    /**
     * 用户权重
     */
    public static final String Weight = "weight";

    /**
     * 视频添加进收藏夹
     */
    public static final String Collect_Add = "collect_add";

    /**
     * 为视频取消收藏
     */
    public static final String Dis_Collect_Add = "dis_collect_add";


    private String type;

    private RelUserVideoFavor favor;

    private CommonPublishVo commonPublish;

    private RelUserVideoShare share;

    private RelUserVideoHistory history;

    private RelUserFan userFan;

    private TagWeight weight;

    private String collectId;

    private String videoId;

    public FineMessage(String type ,String collectId, String videoId) {
        this.type = type;
        this.collectId = collectId;
        this.videoId = videoId;
    }

    public FineMessage(String type, RelUserFan userFan) {
        this.type = type;
        this.userFan = userFan;
    }

    public FineMessage(String type, RelUserVideoHistory history) {
        this.type = type;
        this.history = history;
    }

    public FineMessage(String type, RelUserVideoFavor favor) {
        this.type = type;
        this.favor = favor;
    }

    public FineMessage(String type, CommonPublishVo commonPublish) {
        this.type = type;
        this.commonPublish = commonPublish;
    }

    public FineMessage(String type, RelUserVideoShare share) {
        this.type = type;
        this.share = share;
    }

    public FineMessage(String type, TagWeight weight) {
        this.type = type;
        this.weight = weight;
    }
}
